package org.datacoder.geocoding.datastructures.geoshapes

import com.vividsolutions.jts.geom.*
import org.datacoder.geocoding.*
import org.datacoder.geocoding.jurisdiction.*

/**
 * The GeoShape class represents an arbitrary
 * shape.  GeoShapes represent a jurisdiction,
 * and can be in the form of the bounding rectangle
 * (GeoRectangle), the lower left corner of the
 * bounding rectangle (GeoPoint), etc.
 */
abstract class GeoShape {

    // Some finders can be oriented either on latitude
    // or on longitude, using these constants.
    public static final int NONE = 0
    public static final int LON = 1
    public static final int LAT = 2

    public static int getOtherType(int type){
        if(type == LON){
            return LAT
        }else{
            return LON
        }
    }

    public Jurisdiction juris = null

    public abstract Geometry toGeometry()

}

